//
//  UINavigationController+SpeedPush.m
//  E_commerce
//
//  Created by Coco on 16/3/2.
//  Copyright © 2016年 cn.wenzhou. All rights reserved.
//

#import "UINavigationController+SpeedPush.h"



@implementation UINavigationController(SpeedPush)

- (void)ExPushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    UIViewController *controller =  [self.viewControllers lastObject];
    
    NSArray *arr = self.viewControllers;
    [controller setHidesBottomBarWhenPushed:YES];
    [self pushViewController:viewController animated:YES];
    if (arr.count==1) {
        [controller setHidesBottomBarWhenPushed:NO];
        
    }else{
        [controller setHidesBottomBarWhenPushed:YES];
    }
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
